@echo off

SET "url="
IF "%~1"=="app" (
  SET "url=%CD%\app\pubspec.yaml"
) ELSE IF "%~1"=="core" (
  SET "url=%CD%\lib_core\pubspec.yaml"
) ELSE IF "%~1"=="ui" (
  SET "url=%CD%\lib_ui\pubspec.yaml"
) ELSE IF "%~1"=="deeplink" (
  SET "url=%CD%\lib_deeplink\pubspec.yaml"
) ELSE IF "%~1"=="community" (
  SET "url=%CD%\business_community\pubspec.yaml"
) ELSE IF "%~1"=="device" (
  SET "url=%CD%\business_device\pubspec.yaml"
) ELSE IF "%~1"=="scene" (
  SET "url=%CD%\business_scene\pubspec.yaml"
) ELSE IF "%~1"=="user" (
  SET "url=%CD%\business_user\pubspec.yaml"
) ELSE (
  SET "url="
)
IF %url% == "" (
  echo "选择择你需要生成代码的模块，如 ./flutter_gen.sh common"
  exit
)
echo "%url%"
fluttergen -c %url%